bug? Coercing float8 to text sticks number in the middle of a date - Mailing list pgsql-bugs

From Donald Jackson
Subject bug? Coercing float8 to text sticks number in the middle of a date
Date
Msg-id l0311070db37b67d19062@[132.183.120.67]
Whole thread Raw
List pgsql-bugs
The function:

CREATE FUNCTION zfin_comments(text) RETURNS text AS
'select lod::text || analysis_type::text
AS comments FROM markers WHERE marker_id = $1;'
LANGUAGE 'SQL';

The output:

ssr_db=> select marker_id, lod, analysis_type, zfin_comments(marker_id)
from markers;
marker_id|  lod|analysis_type|zfin_comments
---------+-----+-------------+---------------------------------------
Z8551    |19.27|final        |Fri Dec 31 19:00:19.27 1999 ESTfinal
Z8554    |13.72|final        |Fri Dec 31 19:00:13.72 1999 ESTfinal
Z8563    |18.96|final        |Fri Dec 31 19:00:18.96 1999 ESTfinal
Z8574    |18.96|final        |Fri Dec 31 19:00:18.96 1999 ESTfinal
Z8602    |20.77|final        |Fri Dec 31 19:00:20.77 1999 ESTfinal
Z8604    |17.79|final        |Fri Dec 31 19:00:17.79 1999 ESTfinal
Z8613    |17.16|final        |Fri Dec 31 19:00:17.16 1999 ESTfinal
...

Apparently, when I try to force the float8 value into text
it ends up as seconds in a datetime?  I looked for a function to convert
float to text, but found none...

thanks!

Don Jackson



pgsql-bugs by date:

Previous
From: "C. Arthur Venable III"
Date:
Subject: 10% off custom web design
Next
From: "Mark Wright"
Date:
Subject: Bug found in beta version